<?php
class MHDEV_View_Helper_GetThreadTitle extends Zend_View_Helper_Abstract
{
	public function GetThreadTitle($thread_uid)
	{
		// db
		$threads 	= new Threads();
		
		// query
		$getThread	= $threads->fetchAll('uid = ' . $thread_uid);
		
		if($getThread->count() > 0)
		{
			$thread	= $getThread->toArray();
			return $thread[0]['title'];
		}
		else
		{
			return 'Error';
		}
	}
}